<template>
    <div class="service">
         <h2>我的工单</h2>
        <div class="myOrders">
           <div class="list" v-if="list.length">
				<ul class="list_product clear">
					<li v-for="(item,index) in list" :key="index">
						<span class="circle"></span>
						工单编号{{item.number}}
						<p class="smdeatil">回复内容：{{item.reply}}</p>
						<p class="smdeatil">{{item.addtime}}</p>
						<div class="smright">
							<p class="scount">状态</p>
							<p class="state" v-if="item.status ==1">待回复</p>
							<p class="state" v-else>已回复</p>
						</div>
					</li>
				</ul>
		    </div>
            <div class="moreOrders" v-else>暂无数据</div>
        </div>
    </div>
</template>
<script>
import FormPreview from "vux/src/components/form-preview/";
import Avatar from "../avatar/avatar";
import { listgongdan } from "../../../../config/getData";

export default {
  components: {
    FormPreview,
    Avatar
  },
  beforeCreate(){

  },
  created() {
    listgongdan().then(res => {

      console.log(res);
      this.list = res.data
      // console.log(this.list.length);
    });
  },
  methods: {
    updataImg(imgUrl) {
      this.updateImgData.push(imgUrl);
      this.avatar = false;
    }
  },
  data() {
    return {
      codeImg: "../../../../assets/images/erweima.png",
      tel: "13838816123",
      avatar: false,
      updateImgData: [],

      list: [],
      buttons2: [
        {
          style: "primary",
          onButtonClick: name => {
            alert(`clicking ${name}`);
          }
        }
      ]
    };
  },
  methods: {

  }
};
</script>
<style lang="scss" scoped>
@import "../../../../assets/css/all.scss";
input,
textarea {
  border: none;
  -webkit-appearance: none;
  background: none;
}
.service {
  @include screen;
  min-height: 100%;
  overflow-y: auto;
  .list {
    margin-top: 0px;
    background: #ffffff;
  }

  .list_product {
    width: 95%;
    margin-left: 5%;
  }
  .list_product li {
    padding-top: 10px;
    padding-bottom: 15px;
    padding-left: 20px;
    border-bottom: 1px solid #e7e7e7;
    position: relative;
    p{
      width: 80%;
    }
  }
  .list_product a li {
    color: #646464;
  }

  .count {
    color: #bbbbbb;
  }
  .list_arrow {
    margin-top: 15px;
    padding-left: 6px;
  }
  .list_help {
    margin-top: 20px;
    background: #ffffff;
    padding: 10px 0;
  }
  .list_help a {
    color: #646464;
  }
  .help_arrow {
    margin-top: 3px;
    padding-right: 15px;
    float: right;
  }

  .deatil {
    padding-top: 50px;
    text-align: center;
    color: #ffffff;
  }
  .deatil li:nth-of-type(1) {
    font-size: 16px;
    margin-top: 10px;
  }
  .deatil li:nth-of-type(2) {
    font-size: 24px;
  }
  .deatil li:nth-of-type(3) {
    color: #b8b8b8;
  }
  .smdeatil {
    color: #999999;
    font-size: 12px;
    margin-top: 2px;
  }
  .circle {
    width: 8px;
    height: 8px;
    background: #98daf3;
    position: absolute;
    top: 20px;
    left: 0;
    border-radius: 50%;
  }
  .smright {
    position: absolute;
    right: 0px;
    top: 20px;
    font-size: 14px;
    text-align: center;
    width: 60px;
  }
  .circle2 {
    width: 8px;
    height: 8px;
    background: #23abdd;
    position: absolute;
    top: 20px;
    left: 0;
    border-radius: 50%;
  }
  .state {
    color: #23abdd;
  }
  .state2 {
    color: #98daf3;
  }

  h2 {
    color: #555;
    padding: 5px 0px 5px 15px;
    font-size: 18px;
    border-bottom: 1px solid #cccccc;
    margin-top: 10px;
  }
  //   ul {
  //     li {
  //       margin-top: 15px;
  //       label {
  //         display: inline-block;
  //         width: 100px;
  //         line-height: 30px;
  //         text-align: right;
  //         padding-right: 15px;
  //       }
  //       input[type="text"] {
  //         background: #ffffff;
  //         line-height: 35px;
  //         text-indent: 18px;
  //       }
  //       textarea {
  //         vertical-align: middle;
  //         background: #ffffff;
  //         text-indent: 18px;
  //         padding: 5px 0;
  //       }
  //       .sendMsg {
  //         background: #3296fa;
  //         color: #ffffff;
  //         width: 37%;
  //         display: block;
  //         margin: 0 auto;
  //         line-height: 35px;
  //         border-radius: 4px;
  //       }
  //     }
  //   }
  .myOrders {
    .moreOrders {
      text-align: center;
      padding: 15px 0;
      background: #ffffff;
      color: #3296fa;
      text-decoration: underline;
    }
  }
  .contact {
    text-align: center;
    padding-top: 20px;
  }
}
</style>

